package com.thz.websqlit.contact.repository;

import com.thz.websqlit.contact.entity.SearchChatEntity;
import com.thz.websqlit.mybatis.entity.ChatReportEntity;
import com.thz.websqlit.mybatis.entity.PtContactEnity;
import com.thz.websqlit.user.entity.UserSearchEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ContactDao {
    List<PtContactEnity> queryContactListById(@Param("entity")  UserSearchEntity userSearchEntity);
    List<PtContactEnity> queryMessageListById(@Param("entity") UserSearchEntity userSearchEntity);
    void updateRemarkById(@Param("entity") PtContactEnity contactEnity);

    void addFriendsById(@Param("userUuid")String userUuid,
                        @Param("contactUuid") String contactUuid,
                        @Param("contactRemark") String contactRemark);

    List<ChatReportEntity> queryChartReport(@Param("search")SearchChatEntity search);

    /**
     * 本端更新通迅录状态已读取
     * @param search
     */
    void updateLocalContactReadState(@Param("search") SearchChatEntity search);

    /**
     * 本端增加聊天记录
     * @param chatReportEntity
     */
    void addLocalChartReport(@Param("entity") ChatReportEntity chatReportEntity);

    /**
     * 对端增加聊天记录
     * @param chatReportEntity
     */
    void addRemoteChartReport(@Param("entity") ChatReportEntity chatReportEntity);

    /**
     * 对端更新通迅录状态新消息
     * @param chatReportEntity
     */
    void updateRemoteContactNewState(@Param("entity") ChatReportEntity chatReportEntity);


}
